import {reactive, ref} from "vue";
import http from "../http";
import doctor from "./doctor.js";
import settings from "../settings.js";
const coupon = reactive({
    empty_flag: true,
    coupon_list: [],
    doctor_id: "",
    get_coupon_list(token){
        this.doctor_id = localStorage.getItem("doctor_id")
        return http.post(`/order/enable/`, { doctor_id: this.doctor_id }, {
            headers: {
                Authorization: "Bearer " + token
            }
        }).then(response=>{
            console.log(response.data)
            this.coupon_list = response.data.coupon_list
            this.empty_flag = false
        })
    }

})

export default coupon;